import request from '@/utils/request/request';

// 分页查询（未确认状态）
// eslint-disable-next-line import/prefer-default-export
export function planList(data: any) {
  return request.post(
    '/api/procurement/require/plan-list/pageForInquiry',
    data
  );
}
// 获取货源供应商
export function planSupplier(data: any) {
  return request.post('/api/procurement/require/plan-supplier/batchSave', data);
}
// 删除供应商
export function delSupplier(data: any) {
  return request.delete('/api/procurement/require/plan-supplier', { data });
}
// 货源供应商list
export function planListNo(params: any) {
  return request.get(
    '/api/procurement/require/plan-supplier/pageByPlanListNo',
    {
      params,
    }
  );
}
// 创建询价单
export function createInquiry(data: any) {
  return request.post('/api/procurement/require/inquiry/createInquiry', data);
}
// 撤销询价
export function draw(data: any) {
  return request.post(
    '/api/procurement/require/plan-list/updateInquiryStatus',
    data
  );
}
// 撤回询价单
export function drawInquiry(data: any) {
  return request.post('/api/procurement/require/inquiry/drawInquiry', data);
}
// 修改询价单
export function updatePlan(data: any) {
  return request.post(
    '/api/procurement/require/plan-list/updatePlanForXjd',
    data
  );
}
